package com.glela.goods.mapper;

import java.util.List;

import com.glela.goods.model.GoodsDetail;
import org.apache.ibatis.annotations.Param;

public interface GoodsDetailMapper {

	/**
	 * 根据商品id查询
	 * @author houmf
	 * @param goodsId
	 * @return
	 */
	public List<GoodsDetail> selectGoodsDetailByGoodId(@Param("goodId") long goodId,@Param("type") int type);
	
	/**
	 * 根据id查询商品详情(按照排序字段升序排序 只要一条数据)
	 * @author houmf
	 * @param id
	 * @return
	 */
	public GoodsDetail selectGoodsDetailById(@Param("goodId")long goodId,@Param("type")int type) ;

    public void insertSelectiveBatch(@Param("goodsDetailList") List<GoodsDetail> goodsDetailList);
	/**
	 * @Description: 根据商品Id删除详情
	 * @Author: zhangrenjie
	 * @Date: 2018/2/1 14:28
	 *
	 */
    public void deleteByGoodId(@Param("goodId") long goodId);
}
